using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Threading;


using Advent.aiDevices;

namespace Advent
{
    public partial class DemoForm : Form
    {
        public DemoForm()
        {
            InitializeComponent();
        }

        private COSimulation Sim = null;


        private void btn_StartSimulation_Click(object sender, EventArgs e)
        {
            try
            {
                if (Sim == null)
                {
                    Sim = new COSimulation();
                    Sim.StartSimulation();
                    btn_StartSimulation.Text = "Stop CO Simulation";
                }
                else
                {
                    Sim.EndSimulation();
                    Sim = null;
                    btn_StartSimulation.Text = "Start CO Simulation";
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
            

            }
        }

   

    }
}
